package oo_day01;

/**  学生类的测试类  */

public class StudentTest {
    public static void main(String[] args) {
        Student zs = new Student();//调用无参构造方法
        Student ls = new Student("李四",19);
        Student ww = new Student("王五",20,"jsd2302","003");
        zs.sayHi();
        ls.sayHi();
        ww.sayHi();
    }
}
    /*
        //创建一个学生对象
        Student zs = new Student();
        //访问成员变量
        zs.name = "张三";
        zs.age =19;
        zs.className = "Jsd2302";
        zs.stuId = "0001";

        //调用方法
        zs.study();//study()中的this指的是zs那个对象
        zs.sayHi();
        zs.playWith("王五");

        //1)创建一个学生对象
        //2)给所有成员变量赋默认值 ------引用类型----默认:Null
        Student ww = new Student();
        ww.study();//study()中的this指的是ww那个对象
        ww.sayHi();
        ww.playWith("张三");

        Student ls = new Student();
        ls.study();//study()中的this指的是ls那个对象
        ls.sayHi();

         */

